Updated for 2.6.1 by: The Tech Support Team, Pictorius Incorporated
Contents: ProDraw 1.0.Readme
ProDraw 1.0.pgs
ProDraw 1.0.rsrc
Sort XPrims
Sort XPrims Library
Sort XPrims • Read me
Needs Prograph Extensions:
The default configuration of your 'Prograph Extensions' folder, plus:
Sort XPrims (included in this archive)
Math Primitives
The following five files should be moved back one level from the 'Prograph Extensions:Extra Toolbox' folder into the 'Prograph Extensions' folder (note that Prograph Classic WILL NOT find extension files in subfolders of the 'Prograph Extensions' folder):
ProDraw is built on top of the Document Shell. It makes use of all the implemented file and printing operations in the Document Shell. Please refer to the "Document Shell.Readme" for more information.
ProDraw supports multiple documents, basic file operations and printing. It also supports PICT file and PICT resource exportation.
How To Use ProDraw
---------------------
To create a Rectangle, a Round Rectangle, an Oval, a Line, an Arc, a Squiggle or a Shape object, you must first select the appropriate tool, then you can click and drag your mouse. An appropriate object will be created when the mouse button is up. To create a Polygon, repeat the same process as described above. When you want to create a new anchor point, press the option key once with you mouse down. To create a Str object, just single click on the drawing area.
You may select a list of objects and group them together, then you can move them as one object. However, you will not be able to resize or edit them when they are grouped.
You may double click on an object to invoke a value editor. The value editor allows you to edit the attributes of individual objects. While the editor is open, double click on the pattern field, you will be prompted to select a new pattern for the editing object. Note that the value editor gets opened automatically when a Str object is created.
How To Use In Your Program
-------------------------
Naming conventions used in ProDraw:
- names of class attributes begin with an "!" (except Application/front & current)
- names of attributes of type boolean end with a "?"
- names of methods that may fail end with a "?"
ProDraw documents share a common set of tools, such as Pointer and Oval. Only one of the tools may be selected to be the current active tool. Each document has one drawing area. When a user clicks or drags in the drawing area, ProDraw passes its control to the active tool. It is the tool which handles all the mouse tracking and drawing. For example, the user must select an Oval tool to create an oval in the drawing area. When the user clicks and drags the mouse across the drawing area, the Oval tool keeps track of the mouse and creates an oval object. The oval object created by the tool is stored in the "component list" attribute of the drawing area (it is the component list that forms the picture).
Whenever there is a click, ProDraw searches through the component list to determine
which object is clicked. An "all region" attribute, a region that enclose all the objects, is used to speed up the operation. A simple call to "PtInRgn" will determine if a click is within or outside of all objects.
You can cut, copy and paste objects within ProDraw. You can also paste ProDraw objects (in the form of picture) to any other draw or paint programs through the desk scrap area. However, you will not be able to paste pictures from other draw programs into ProDraw. (i.e., ProDraw cannot import the PICT format.) When objects are cut or copied from ProDraw, they are are saved in both internal clipboard and desk scrap. The internal clipboard is used for all the internal cut, copy and paste functions. A copy of the picture is saved in the desk scrap to allow other programs to copy ProDraw pictures.
Printing on the Macintosh is as easy as drawing to the printer driver. When the print command is invoked, ProDraw draws the existing picture to the printer. You can use print setup to modify the printing environment.
You Take It From There
-------------------------
Do you want to implement color? Add a color attribute to the Draw Item Class to store the color information of objects. You will need to modify the draw method of each object to use the appropriate toolbox calls. For example, you will be using FillCOval instead of FillOval, or FillCRect instead of FillRect.
The implementation of the "Str" object is not ideal. One cannot insert or delete text in the middle of the Str object directly on the screen. This is because an edit record is not used in the implementation. I will leave it to you to enhance the Str object to a true Edit Text object.